.TH RXP 1 "RXP release 1.2"
.SH NAME
rxp - XML parser program
.SH SYNOPSIS
.B rxp
[
.B \-avVEsbnmtx
] [
.B -o b|p|0|1|2|3
] [
.B -c
.I encoding
] [
.I url
]
.SH DESCRIPTION
.B rxp
reads and parses XML from the
.I url
(or standard input if none is provided) and writes it to standard
output, optionally expanding entities, defaulting attributes, and
translating to a different output encoding.

.SH OPTIONS
.TP
.B -a
Insert declared default values for omitted attributes.
.TP
.B -v
Be verbose.
.TP
.B -V
Validate the document.  Repeating this option will make the program 
treat validity errors as well-formedness errors, and exit
after the first validity error (otherwise a warning will be printed for
each one).
.TP
.B -N
Enable XML namespace support.  The document will be checked for
correct namespace syntax, and if \f3-b\f1 is specified  qualified 
element and attribute names will be displayed with their URIs.
.TP
.B -S
Keep track of xml:space attributes.  This will only affect output when
\f3-b\f1 is specified.
.TP
.B -e
Obsolete, do not use.
.TP
.B -E
Do not expand entity references (opposite of old \f3-e\f1 flag)
.TP
.B -s
Be silent (that is, suppress output).  Useful for benchmarking.
.TP
.B -b
Print output as "bits".
.TP
.B -n
Treat the input as normalised SGML rather than XML.  Not intended
for general use.
.TP
.B -o
If this flag is \f3p\f1, output is in the default (plain) format. If it
is \f3b\f1, output is printed as "bits" (equivalent to
\f3-b\f1).    If it
is \f30\f1, output is suppressed (equivalent to \f3-s\f1).  If it is
\f31\f1, \f32\f1 or \f33\f1, output is in first, second or third
canonical form.
.TP
.B -m
Merge PCData across entity references.  This will only affect the output when
\f3-b\f1 is specified.
.TP
.B -t
Read in the input as a tree, rather than bits.  Should make no difference
to the output.
.TP
.B -x
XML well-formedness checking mode.  Suppress most warnings but treat
all XML well-formedness errors as fatal.
This flag implies the \f3-a\f1 flag, and sets
the output encoding to UTF-8 unless the \f3-c\f1 flag is given.  It
sets the output format to first canonical form unless the \f3-o\f1,
\f3-b\f1 or \f3-s\f1 flag is given.
.TP
\f3-c \f2encoding\f1
Produce output in the specified character encoding.  Known encodings
include \f3ISO-8859-1\f1, \f3UTF-8\f1, \f3ISO-10646-UCS\f1 and \f3UTF-16\f1.  
16-bit encoding names my be suffixed with \f3-B\f1 or \f3-L\f1 to
specify big- or little-endian byte order (the default is the host
byte order).  If no \f3-c\f1 or \f3-x\f1 option is given, output is in 
the same encoding as the input document.
.SH EXIT STATUS
If the \f3-V\f1 flag is given, and the document is well-formed but
not valid, 2 is returned.  If the document is not well-formed, or a
system error occurs, 1 is returned.  Otherwise 0 is returned.
Since the parser can expand external entities even when not validating,
it treats certain errors which are technically validity errors
as well-formedness errors.  If \f3-x\f1 is not specified, some
well-formedness errors produce only warnings and do not affect the
exit status.

